package com.mystring;

public class MyStringDemo {

	public static void main(String[] args) {
		
		String s="Hello";
		//String s1=new String("Hello");
		
		/* s1=s1.intern();
		 System.out.println(s==s1); //reference checking 
		System.out.println(s.equals(s1)); //content checking
		
		
*/		//String object are immutable. means you can not modify that object.
		String s1=" World !";
		     char []charAr=s1.toCharArray();
		     
		 
		s= s.concat(s1);
		
		String st="Hello "+ " World !"+ " This "+ "Is "+ " Demo";
		
		
		
		 System.out.println(s);
		 
		 StringBuilder sb=new  StringBuilder("Hello");
		  sb.append(" World");
		  System.out.println(sb);
		 
		 /*s= s.toUpperCase();
		 System.out.println(s);
		s=   s.toLowerCase();
		System.out.println(s);*/
		   
	}
}
